import { shikiPlugin } from "@vuepress/plugin-shiki";
import { searchProPlugin} from "vuepress-plugin-search-pro";
import {autoCatalogPlugin} from "vuepress-plugin-auto-catalog";
import { defineUserConfig } from "vuepress";
import theme from "./theme.js";

export default defineUserConfig({
  base: "/yao-yu-blog/",
  //搜索插件
  plugins: [
    searchProPlugin({
      // 索引全部内容
      indexContent: true,
      // 为分类和标签添加索引
      //  customFields: [
      //    {
      //      name: "category",
      //      getter: (page) => page.frontmatter.category,
      //      formatter: "分类：$content",
      //    },
      //    {
      //      name: "tag",
      //      getter: (page) => page.frontmatter.tag,
      //      formatter: "标签：$content",
      //    },
      //  ],
    }),
    // shikiPlugin({
    //   // theme: "one-dark-pro",
    //   theme: "dark-plus"
    // }),
    // autoCatalogPlugin({

    // })
  ],
  title: "",
  lang: "zh-CN",
  description: "种一棵树最好的时间是十年前，其次是现在。现在有空吧，哪就记录一下笔记吧~~~",
  theme,
  // Enable it with pwa
  shouldPrefetch: false,
});
